﻿@using Telerik.Web.Mvc.UI
@{  
    ViewBag.Title = T("Admin.Catalog.Attributes.ProductAttributes").Text;
}
<div class="section-header">
    <div class="title">
        @T("Admin.Catalog.Attributes.ProductAttributes")
    </div>
    <div class="options">
        <a href="@Url.Action("Create")" class="btn btn-primary">
			<i class="fa fa-plus"></i>
			<span>@T("Admin.Common.AddNew")</span>
		</a>
    </div>
</div>

<div>
	@(Html.Telerik().Grid<ProductAttributeModel>()
		.Name("productattributes-grid")
		.Columns(columns =>
		{
			columns.Bound(x => x.Name)
				.ClientTemplate("<a href='Edit/<#= Id #>'><#= Name #></a>");
			columns.Bound(x => x.Alias);
			columns.Bound(x => x.AllowFiltering)
				.Width(200)
				.ClientTemplate(@Html.SymbolForBool("AllowFiltering"))
				.Centered();
			columns.Bound(x => x.DisplayOrder)
				.Width(200)
				.Centered();
		})
		.Pageable(settings => settings.PageSize((int)ViewData["GridPageSize"]).Position(GridPagerPosition.Both))
		.DataBinding(dataBinding => dataBinding.Ajax().Select("List", "ProductAttribute"))
		.PreserveGridState()
		.EnableCustomBinding(true))
</div>   